<?php

/**
 * commentaire actions.
 *
 * @package    explications_informatiques
 * @subpackage docs
 * @author     Guimezanes Cyrille
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class docsActions extends sfActions
{
  public function executeShow(sfWebRequest $request)
  {
	$docs = NULL;
   	switch($request->getParameter('id'))
	{
		case 1:
			$docs = "MentionsLegales.txt";
			$this->titre = "Mentions légales du site";
		break;
		case 2:
			$docs = "ReglesSite.txt";
			$this->titre = "Réglement du site";
		break;
		case 3:
			$docs = "ReglementPoint.txt";
			$this->titre = "Réglement des points";
		break;
	}
	
	if($docs != NULL)
		$this->document = file_get_contents("Documents/".$docs);
	
	$this->forward404Unless($this->document);
		
  }

}
